package com.shujia.indicators.utils;

import java.sql.Connection;
import java.sql.DriverManager;
import java.sql.SQLException;

public class JdbcUtil {
    private static Connection conn;

    public static Connection getConnection() throws SQLException, ClassNotFoundException {
        if (conn == null) {
            Class.forName("com.mysql.cj.jdbc.Driver");
            conn = DriverManager.getConnection("jdbc:mysql://localhost:3306/bigdata005?useSSL=false&useUnicode=true&characterEncoding=UTF-8","bigdata005","ShuJia666777...");
        }
        return conn;
    }
}
